package cn.echo.common.Timer;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2017/6/15.
 */
    @Component
public class TimerWork {
    @Scheduled(cron="0/5 * *  * * ? ")   //每5秒执行一次
    public void work(){
        System.out.println("hello world");
    }
    }
